import {createRouter,createWebHistory,RouteRecordRaw} from 'vue-router';


//定义路由规则
const routes:Array<RouteRecordRaw> = [
    {
        path:"/",
        name:"HelloWorld",
        component:()=>import("../components/HelloWorld.vue")
    },
    {
        path:"/Register",
        name:"Register",
        component:()=>import("../views/User/Register.vue")
    },
    {
        path:"/Login",
        name:"Login",
        component:()=>import("../views/User/Login.vue")
    },
    {
        path:"/ShowUserLoginInfo",
        name:"ShowUserLoginInfo",
        component:()=>import("../views/User/ShowUserLoginInfo.vue")
    },
    {
        path:"/InvestLogin",
        name:"InvestLogin",
        component:()=>import("../views/Invest/InvestLogin.vue")
    },
    {
        path:"/ShowUserInvestInfo",
        name:"ShowUserInvestInfo",
        component:()=>import("../views/Invest/ShowUserInvestInfo.vue")
    },
    {
        path:"/ShowManagerInvestInfo",
        name:"ShowManagerInvestInfo",
        component:()=>import("../views/Invest/ShowManagerInvestInfo.vue")
    },
    {
        path:"/BorrowLogin",
        name:"BorrowLogin",
        component:()=>import("../views/Borrow/BorrowLogin.vue")
    },
    {
        path:"/ShowUserBorrowInfo",
        name:"ShowUserBorrowInfo",
        component:()=>import("../views/Borrow/ShowUserBorrowInfo.vue")
    },
    {
        path:"/ShowManagerBorrowInfo",
        name:"ShowManagerBorrowInfo",
        component:()=>import("../views/Borrow/ShowManagerBorrowInfo.vue")
    },
    {
        path:"/AddUserBorrowInfo/:Bid",
        name:"AddUserBorrowInfo",
        component:()=>import("../views/Borrow/AddUserBorrowInfo.vue")
    },
    {
        path:"/ShowUserBorrowRedeemInfo",
        name:"ShowUserBorrowRedeemInfo",
        component:()=>import("../views/Borrow/ShowUserBorrowRedeemInfo.vue")
    },
    {
        path:"/AddUserBorrowRedeemInfo/:UBid",
        name:"AddUserBorrowRedeemInfo",
        component:()=>import("../views/Borrow/AddUserBorrowRedeemInfo.vue")
    }
]

//创建router实例
const router = createRouter({
    history:createWebHistory(),
    routes
})

export default router;// 导出router实例 